<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\Link */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="link-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'xa_parent_id')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_title')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_url')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'xa_picture')->widget('common\widgets\file_upload\FileUpload',[
        'config'=>[
            //图片上传的一些配置，不写调用默认配置
            'domain_url' => 'http://admin.xacms.com',
        ]
    ]) ?>

    <?//= $form->field($model, 'xa_create_time')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_update_time')->textInput(['maxlength' => true]) ?>

    <?//= $form->field($model, 'xa_remark')->textInput(['maxlength' => true]) ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
